package cn.wolfcode.wolf2w.business.service;

import cn.wolfcode.wolf2w.business.api.domain.DestinationEs;
import cn.wolfcode.wolf2w.business.api.domain.NoteEs;
import cn.wolfcode.wolf2w.business.api.domain.StrategyEs;
import cn.wolfcode.wolf2w.business.api.domain.UserInfoEs;
import cn.wolfcode.wolf2w.business.query.SearchQuery;
import org.springframework.data.domain.Page;

import java.lang.reflect.InvocationTargetException;

public interface ISearchService {
    void saveStrategy(StrategyEs strategyEs);

    void saveUserInfo(UserInfoEs userInfoEs);

    void saveNote(NoteEs noteEs);

    void saveDestination(DestinationEs destinationEs);
    /**
     * 高亮查询通用接口，可以查询攻略、游记、问答、找人
     * T 表示查询数据的MySQL实体类类型，如攻略为Strategy
     * @param clazz Strategy
     * @param esClazz
     * @param qo
     * @param fields
     * @return
     * @param <T>
     */
    <T>Page<T> searchWithHighlight(Class<T> clazz, Class<?> esClazz,
                                   SearchQuery qo,String... fields) throws InvocationTargetException, IllegalAccessException;



}
